package com.demo.jvm.structure.constant;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * CONSTANT_NameAndType_info {
 * u1 tag;
 * u2 name_index;
 * u2 descriptor_index;
 * }
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class CONSTANT_NameAndType_info extends CONSTANT_info {
    private int nameIndex;
    private int descriptorIndex;

    public CONSTANT_NameAndType_info(byte tag, int tableIndex, int nameIndex, int descriptorIndex) {
        super(tag, tableIndex);
        this.nameIndex = nameIndex;
        this.descriptorIndex = descriptorIndex;
    }
}
